<a href="?page=main">Home </a>|| 
<a href="?page=show&paytype=Mieten">Mieten </a>||
<a href="?page=show&paytype=Kaufen">Kaufen </a>||
<a href="?page=service">Service </a>|| 
<a href="?page=kontakt">Kontakt </a>|| 
<a href="?page=impressum">Impressum</a> <br>
<?php
if (in_array($paytype, array('Mieten','Kaufen'))) {
	echo("</div><div class='submenue'>");
	
	$sql = 'SELECT DISTINCT type, paytype
		FROM objects
		WHERE paytype LIKE "'.$paytype.'"';

	$result = mysql_query($sql);

	while ($row = mysql_fetch_array($result))
		echo ("<a href=?page=show&paytype=".$row["paytype"]."&type=".$row["type"].">".$row["type"]."</a> ");

	echo("</div>");
}
